import { View, Text } from "@tarojs/components";
import Taro, { useLoad } from "@tarojs/taro";
import "./index.less";

export default function Index() {
  useLoad(() => {
    console.log("Page loaded.");
  });

  const toScan = () => {
    console.log("first,");
    Taro.redirectTo({
      url: `/packageScan/pages/index/index`,
    });
  };

  return (
    <View className="index">
      <Text>Hello world!</Text>
      <View
        onClick={() => {
          toScan();
        }}
      >
        查看分包
      </View>
    </View>
  );
}
